/*
 *
 *    Copyright (c) 2021 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP

package chip.devicecontroller;

public class ChipClusters {

  public interface DefaultClusterCallback {
    void onSuccess();

    void onError(Exception error);
  }

  // TODO(#7376): add attribute callbacks.

  public abstract static class BaseChipCluster {
    protected long chipClusterPtr;

    public BaseChipCluster(long devicePtr, int endpointId) {
      chipClusterPtr = initWithDevice(devicePtr, endpointId);
    }

    public abstract long initWithDevice(long devicePtr, int endpointId);

    public native void deleteCluster(long chipClusterPtr);

    @SuppressWarnings("deprecation")
    protected void finalize() throws Throwable {
      super.finalize();

      if (chipClusterPtr != 0) {
        deleteCluster(chipClusterPtr);
        chipClusterPtr = 0;
      }
    }
  }

  public static class AccountLoginCluster extends BaseChipCluster {
    public AccountLoginCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void getSetupPIN(GetSetupPINResponseCallback callback, String tempAccountIdentifier) {
      getSetupPIN(chipClusterPtr, callback, tempAccountIdentifier);
    }

    public void login(
        DefaultClusterCallback callback, String tempAccountIdentifier, String setupPIN) {
      login(chipClusterPtr, callback, tempAccountIdentifier, setupPIN);
    }

    private native void getSetupPIN(
        long chipClusterPtr, GetSetupPINResponseCallback callback, String tempAccountIdentifier);

    private native void login(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        String tempAccountIdentifier,
        String setupPIN);

    public interface GetSetupPINResponseCallback {
      void onSuccess(String setupPIN);

      void onError(Exception error);
    }
  }

  public static class ApplicationBasicCluster extends BaseChipCluster {
    public ApplicationBasicCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void changeStatus(DefaultClusterCallback callback, int status) {
      changeStatus(chipClusterPtr, callback, status);
    }

    private native void changeStatus(
        long chipClusterPtr, DefaultClusterCallback callback, int status);
  }

  public static class ApplicationLauncherCluster extends BaseChipCluster {
    public ApplicationLauncherCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void launchApp(
        LaunchAppResponseCallback callback,
        String data,
        int catalogVendorId,
        String applicationId) {
      launchApp(chipClusterPtr, callback, data, catalogVendorId, applicationId);
    }

    private native void launchApp(
        long chipClusterPtr,
        LaunchAppResponseCallback callback,
        String data,
        int catalogVendorId,
        String applicationId);

    public interface LaunchAppResponseCallback {
      void onSuccess(String data);

      void onError(Exception error);
    }
  }

  public static class AudioOutputCluster extends BaseChipCluster {
    public AudioOutputCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void renameOutput(DefaultClusterCallback callback, int index, String name) {
      renameOutput(chipClusterPtr, callback, index, name);
    }

    public void selectOutput(DefaultClusterCallback callback, int index) {
      selectOutput(chipClusterPtr, callback, index);
    }

    private native void renameOutput(
        long chipClusterPtr, DefaultClusterCallback callback, int index, String name);

    private native void selectOutput(
        long chipClusterPtr, DefaultClusterCallback callback, int index);
  }

  public static class BarrierControlCluster extends BaseChipCluster {
    public BarrierControlCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void barrierControlGoToPercent(DefaultClusterCallback callback, int percentOpen) {
      barrierControlGoToPercent(chipClusterPtr, callback, percentOpen);
    }

    public void barrierControlStop(DefaultClusterCallback callback) {
      barrierControlStop(chipClusterPtr, callback);
    }

    private native void barrierControlGoToPercent(
        long chipClusterPtr, DefaultClusterCallback callback, int percentOpen);

    private native void barrierControlStop(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class BasicCluster extends BaseChipCluster {
    public BasicCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void mfgSpecificPing(DefaultClusterCallback callback) {
      mfgSpecificPing(chipClusterPtr, callback);
    }

    private native void mfgSpecificPing(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class BinaryInputBasicCluster extends BaseChipCluster {
    public BinaryInputBasicCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class BindingCluster extends BaseChipCluster {
    public BindingCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void bind(
        DefaultClusterCallback callback, long nodeId, int groupId, int endpointId, long clusterId) {
      bind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId);
    }

    public void unbind(
        DefaultClusterCallback callback, long nodeId, int groupId, int endpointId, long clusterId) {
      unbind(chipClusterPtr, callback, nodeId, groupId, endpointId, clusterId);
    }

    private native void bind(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        long nodeId,
        int groupId,
        int endpointId,
        long clusterId);

    private native void unbind(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        long nodeId,
        int groupId,
        int endpointId,
        long clusterId);
  }

  public static class BridgedDeviceBasicCluster extends BaseChipCluster {
    public BridgedDeviceBasicCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class ColorControlCluster extends BaseChipCluster {
    public ColorControlCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void colorLoopSet(
        DefaultClusterCallback callback,
        int updateFlags,
        int action,
        int direction,
        int time,
        int startHue,
        int optionsMask,
        int optionsOverride) {
      colorLoopSet(
          chipClusterPtr,
          callback,
          updateFlags,
          action,
          direction,
          time,
          startHue,
          optionsMask,
          optionsOverride);
    }

    public void enhancedMoveHue(
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionsMask,
        int optionsOverride) {
      enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride);
    }

    public void enhancedMoveToHue(
        DefaultClusterCallback callback,
        int enhancedHue,
        int direction,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      enhancedMoveToHue(
          chipClusterPtr,
          callback,
          enhancedHue,
          direction,
          transitionTime,
          optionsMask,
          optionsOverride);
    }

    public void enhancedMoveToHueAndSaturation(
        DefaultClusterCallback callback,
        int enhancedHue,
        int saturation,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      enhancedMoveToHueAndSaturation(
          chipClusterPtr,
          callback,
          enhancedHue,
          saturation,
          transitionTime,
          optionsMask,
          optionsOverride);
    }

    public void enhancedStepHue(
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      enhancedStepHue(
          chipClusterPtr,
          callback,
          stepMode,
          stepSize,
          transitionTime,
          optionsMask,
          optionsOverride);
    }

    public void moveColor(
        DefaultClusterCallback callback,
        int rateX,
        int rateY,
        int optionsMask,
        int optionsOverride) {
      moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride);
    }

    public void moveColorTemperature(
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int colorTemperatureMinimum,
        int colorTemperatureMaximum,
        int optionsMask,
        int optionsOverride) {
      moveColorTemperature(
          chipClusterPtr,
          callback,
          moveMode,
          rate,
          colorTemperatureMinimum,
          colorTemperatureMaximum,
          optionsMask,
          optionsOverride);
    }

    public void moveHue(
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionsMask,
        int optionsOverride) {
      moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride);
    }

    public void moveSaturation(
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionsMask,
        int optionsOverride) {
      moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride);
    }

    public void moveToColor(
        DefaultClusterCallback callback,
        int colorX,
        int colorY,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      moveToColor(
          chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride);
    }

    public void moveToColorTemperature(
        DefaultClusterCallback callback,
        int colorTemperature,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      moveToColorTemperature(
          chipClusterPtr, callback, colorTemperature, transitionTime, optionsMask, optionsOverride);
    }

    public void moveToHue(
        DefaultClusterCallback callback,
        int hue,
        int direction,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      moveToHue(
          chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride);
    }

    public void moveToHueAndSaturation(
        DefaultClusterCallback callback,
        int hue,
        int saturation,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      moveToHueAndSaturation(
          chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride);
    }

    public void moveToSaturation(
        DefaultClusterCallback callback,
        int saturation,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      moveToSaturation(
          chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride);
    }

    public void stepColor(
        DefaultClusterCallback callback,
        int stepX,
        int stepY,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      stepColor(
          chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride);
    }

    public void stepColorTemperature(
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int colorTemperatureMinimum,
        int colorTemperatureMaximum,
        int optionsMask,
        int optionsOverride) {
      stepColorTemperature(
          chipClusterPtr,
          callback,
          stepMode,
          stepSize,
          transitionTime,
          colorTemperatureMinimum,
          colorTemperatureMaximum,
          optionsMask,
          optionsOverride);
    }

    public void stepHue(
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      stepHue(
          chipClusterPtr,
          callback,
          stepMode,
          stepSize,
          transitionTime,
          optionsMask,
          optionsOverride);
    }

    public void stepSaturation(
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionsMask,
        int optionsOverride) {
      stepSaturation(
          chipClusterPtr,
          callback,
          stepMode,
          stepSize,
          transitionTime,
          optionsMask,
          optionsOverride);
    }

    public void stopMoveStep(
        DefaultClusterCallback callback, int optionsMask, int optionsOverride) {
      stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride);
    }

    private native void colorLoopSet(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int updateFlags,
        int action,
        int direction,
        int time,
        int startHue,
        int optionsMask,
        int optionsOverride);

    private native void enhancedMoveHue(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionsMask,
        int optionsOverride);

    private native void enhancedMoveToHue(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int enhancedHue,
        int direction,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void enhancedMoveToHueAndSaturation(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int enhancedHue,
        int saturation,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void enhancedStepHue(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void moveColor(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int rateX,
        int rateY,
        int optionsMask,
        int optionsOverride);

    private native void moveColorTemperature(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int colorTemperatureMinimum,
        int colorTemperatureMaximum,
        int optionsMask,
        int optionsOverride);

    private native void moveHue(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionsMask,
        int optionsOverride);

    private native void moveSaturation(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionsMask,
        int optionsOverride);

    private native void moveToColor(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int colorX,
        int colorY,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void moveToColorTemperature(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int colorTemperature,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void moveToHue(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int hue,
        int direction,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void moveToHueAndSaturation(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int hue,
        int saturation,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void moveToSaturation(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int saturation,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void stepColor(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepX,
        int stepY,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void stepColorTemperature(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int colorTemperatureMinimum,
        int colorTemperatureMaximum,
        int optionsMask,
        int optionsOverride);

    private native void stepHue(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void stepSaturation(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionsMask,
        int optionsOverride);

    private native void stopMoveStep(
        long chipClusterPtr, DefaultClusterCallback callback, int optionsMask, int optionsOverride);
  }

  public static class ContentLauncherCluster extends BaseChipCluster {
    public ContentLauncherCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void launchContent(LaunchContentResponseCallback callback, int autoPlay, String data) {
      launchContent(chipClusterPtr, callback, autoPlay, data);
    }

    public void launchURL(
        LaunchURLResponseCallback callback, String contentURL, String displayString) {
      launchURL(chipClusterPtr, callback, contentURL, displayString);
    }

    private native void launchContent(
        long chipClusterPtr, LaunchContentResponseCallback callback, int autoPlay, String data);

    private native void launchURL(
        long chipClusterPtr,
        LaunchURLResponseCallback callback,
        String contentURL,
        String displayString);

    public interface LaunchContentResponseCallback {
      void onSuccess(String data, int contentLaunchStatus);

      void onError(Exception error);
    }

    public interface LaunchURLResponseCallback {
      void onSuccess(String data, int contentLaunchStatus);

      void onError(Exception error);
    }
  }

  public static class DescriptorCluster extends BaseChipCluster {
    public DescriptorCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class DiagnosticLogsCluster extends BaseChipCluster {
    public DiagnosticLogsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void retrieveLogsRequest(
        DefaultClusterCallback callback,
        int intent,
        int requestedProtocol,
        byte[] transferFileDesignator) {
      retrieveLogsRequest(
          chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator);
    }

    private native void retrieveLogsRequest(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int intent,
        int requestedProtocol,
        byte[] transferFileDesignator);
  }

  public static class DoorLockCluster extends BaseChipCluster {
    public DoorLockCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void clearAllPins(ClearAllPinsResponseCallback callback) {
      clearAllPins(chipClusterPtr, callback);
    }

    public void clearAllRfids(ClearAllRfidsResponseCallback callback) {
      clearAllRfids(chipClusterPtr, callback);
    }

    public void clearHolidaySchedule(
        ClearHolidayScheduleResponseCallback callback, int scheduleId) {
      clearHolidaySchedule(chipClusterPtr, callback, scheduleId);
    }

    public void clearPin(ClearPinResponseCallback callback, int userId) {
      clearPin(chipClusterPtr, callback, userId);
    }

    public void clearRfid(ClearRfidResponseCallback callback, int userId) {
      clearRfid(chipClusterPtr, callback, userId);
    }

    public void clearWeekdaySchedule(
        ClearWeekdayScheduleResponseCallback callback, int scheduleId, int userId) {
      clearWeekdaySchedule(chipClusterPtr, callback, scheduleId, userId);
    }

    public void clearYeardaySchedule(
        ClearYeardayScheduleResponseCallback callback, int scheduleId, int userId) {
      clearYeardaySchedule(chipClusterPtr, callback, scheduleId, userId);
    }

    public void getHolidaySchedule(GetHolidayScheduleResponseCallback callback, int scheduleId) {
      getHolidaySchedule(chipClusterPtr, callback, scheduleId);
    }

    public void getLogRecord(GetLogRecordResponseCallback callback, int logIndex) {
      getLogRecord(chipClusterPtr, callback, logIndex);
    }

    public void getPin(GetPinResponseCallback callback, int userId) {
      getPin(chipClusterPtr, callback, userId);
    }

    public void getRfid(GetRfidResponseCallback callback, int userId) {
      getRfid(chipClusterPtr, callback, userId);
    }

    public void getUserType(GetUserTypeResponseCallback callback, int userId) {
      getUserType(chipClusterPtr, callback, userId);
    }

    public void getWeekdaySchedule(
        GetWeekdayScheduleResponseCallback callback, int scheduleId, int userId) {
      getWeekdaySchedule(chipClusterPtr, callback, scheduleId, userId);
    }

    public void getYeardaySchedule(
        GetYeardayScheduleResponseCallback callback, int scheduleId, int userId) {
      getYeardaySchedule(chipClusterPtr, callback, scheduleId, userId);
    }

    public void lockDoor(LockDoorResponseCallback callback, String pin) {
      lockDoor(chipClusterPtr, callback, pin);
    }

    public void setHolidaySchedule(
        SetHolidayScheduleResponseCallback callback,
        int scheduleId,
        long localStartTime,
        long localEndTime,
        int operatingModeDuringHoliday) {
      setHolidaySchedule(
          chipClusterPtr,
          callback,
          scheduleId,
          localStartTime,
          localEndTime,
          operatingModeDuringHoliday);
    }

    public void setPin(
        SetPinResponseCallback callback, int userId, int userStatus, int userType, String pin) {
      setPin(chipClusterPtr, callback, userId, userStatus, userType, pin);
    }

    public void setRfid(
        SetRfidResponseCallback callback, int userId, int userStatus, int userType, String id) {
      setRfid(chipClusterPtr, callback, userId, userStatus, userType, id);
    }

    public void setUserType(SetUserTypeResponseCallback callback, int userId, int userType) {
      setUserType(chipClusterPtr, callback, userId, userType);
    }

    public void setWeekdaySchedule(
        SetWeekdayScheduleResponseCallback callback,
        int scheduleId,
        int userId,
        int daysMask,
        int startHour,
        int startMinute,
        int endHour,
        int endMinute) {
      setWeekdaySchedule(
          chipClusterPtr,
          callback,
          scheduleId,
          userId,
          daysMask,
          startHour,
          startMinute,
          endHour,
          endMinute);
    }

    public void setYeardaySchedule(
        SetYeardayScheduleResponseCallback callback,
        int scheduleId,
        int userId,
        long localStartTime,
        long localEndTime) {
      setYeardaySchedule(
          chipClusterPtr, callback, scheduleId, userId, localStartTime, localEndTime);
    }

    public void unlockDoor(UnlockDoorResponseCallback callback, String pin) {
      unlockDoor(chipClusterPtr, callback, pin);
    }

    public void unlockWithTimeout(
        UnlockWithTimeoutResponseCallback callback, int timeoutInSeconds, String pin) {
      unlockWithTimeout(chipClusterPtr, callback, timeoutInSeconds, pin);
    }

    private native void clearAllPins(long chipClusterPtr, ClearAllPinsResponseCallback callback);

    private native void clearAllRfids(long chipClusterPtr, ClearAllRfidsResponseCallback callback);

    private native void clearHolidaySchedule(
        long chipClusterPtr, ClearHolidayScheduleResponseCallback callback, int scheduleId);

    private native void clearPin(
        long chipClusterPtr, ClearPinResponseCallback callback, int userId);

    private native void clearRfid(
        long chipClusterPtr, ClearRfidResponseCallback callback, int userId);

    private native void clearWeekdaySchedule(
        long chipClusterPtr,
        ClearWeekdayScheduleResponseCallback callback,
        int scheduleId,
        int userId);

    private native void clearYeardaySchedule(
        long chipClusterPtr,
        ClearYeardayScheduleResponseCallback callback,
        int scheduleId,
        int userId);

    private native void getHolidaySchedule(
        long chipClusterPtr, GetHolidayScheduleResponseCallback callback, int scheduleId);

    private native void getLogRecord(
        long chipClusterPtr, GetLogRecordResponseCallback callback, int logIndex);

    private native void getPin(long chipClusterPtr, GetPinResponseCallback callback, int userId);

    private native void getRfid(long chipClusterPtr, GetRfidResponseCallback callback, int userId);

    private native void getUserType(
        long chipClusterPtr, GetUserTypeResponseCallback callback, int userId);

    private native void getWeekdaySchedule(
        long chipClusterPtr,
        GetWeekdayScheduleResponseCallback callback,
        int scheduleId,
        int userId);

    private native void getYeardaySchedule(
        long chipClusterPtr,
        GetYeardayScheduleResponseCallback callback,
        int scheduleId,
        int userId);

    private native void lockDoor(
        long chipClusterPtr, LockDoorResponseCallback callback, String pin);

    private native void setHolidaySchedule(
        long chipClusterPtr,
        SetHolidayScheduleResponseCallback callback,
        int scheduleId,
        long localStartTime,
        long localEndTime,
        int operatingModeDuringHoliday);

    private native void setPin(
        long chipClusterPtr,
        SetPinResponseCallback callback,
        int userId,
        int userStatus,
        int userType,
        String pin);

    private native void setRfid(
        long chipClusterPtr,
        SetRfidResponseCallback callback,
        int userId,
        int userStatus,
        int userType,
        String id);

    private native void setUserType(
        long chipClusterPtr, SetUserTypeResponseCallback callback, int userId, int userType);

    private native void setWeekdaySchedule(
        long chipClusterPtr,
        SetWeekdayScheduleResponseCallback callback,
        int scheduleId,
        int userId,
        int daysMask,
        int startHour,
        int startMinute,
        int endHour,
        int endMinute);

    private native void setYeardaySchedule(
        long chipClusterPtr,
        SetYeardayScheduleResponseCallback callback,
        int scheduleId,
        int userId,
        long localStartTime,
        long localEndTime);

    private native void unlockDoor(
        long chipClusterPtr, UnlockDoorResponseCallback callback, String pin);

    private native void unlockWithTimeout(
        long chipClusterPtr,
        UnlockWithTimeoutResponseCallback callback,
        int timeoutInSeconds,
        String pin);

    public interface ClearAllPinsResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface ClearAllRfidsResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface ClearHolidayScheduleResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface ClearPinResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface ClearRfidResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface ClearWeekdayScheduleResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface ClearYeardayScheduleResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface GetHolidayScheduleResponseCallback {
      void onSuccess(
          int scheduleId, long localStartTime, long localEndTime, int operatingModeDuringHoliday);

      void onError(Exception error);
    }

    public interface GetLogRecordResponseCallback {
      void onSuccess(
          int logEntryId,
          long timestamp,
          int eventType,
          int source,
          int eventIdOrAlarmCode,
          int userId,
          String pin);

      void onError(Exception error);
    }

    public interface GetPinResponseCallback {
      void onSuccess(int userId, int userStatus, int userType, String pin);

      void onError(Exception error);
    }

    public interface GetRfidResponseCallback {
      void onSuccess(int userId, int userStatus, int userType, String rfid);

      void onError(Exception error);
    }

    public interface GetUserTypeResponseCallback {
      void onSuccess(int userId, int userType);

      void onError(Exception error);
    }

    public interface GetWeekdayScheduleResponseCallback {
      void onSuccess(
          int scheduleId,
          int userId,
          int daysMask,
          int startHour,
          int startMinute,
          int endHour,
          int endMinute);

      void onError(Exception error);
    }

    public interface GetYeardayScheduleResponseCallback {
      void onSuccess(int scheduleId, int userId, long localStartTime, long localEndTime);

      void onError(Exception error);
    }

    public interface LockDoorResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface SetHolidayScheduleResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface SetPinResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface SetRfidResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface SetUserTypeResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface SetWeekdayScheduleResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface SetYeardayScheduleResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface UnlockDoorResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }

    public interface UnlockWithTimeoutResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }
  }

  public static class ElectricalMeasurementCluster extends BaseChipCluster {
    public ElectricalMeasurementCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster {
    public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void resetCounts(DefaultClusterCallback callback) {
      resetCounts(chipClusterPtr, callback);
    }

    private native void resetCounts(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class FixedLabelCluster extends BaseChipCluster {
    public FixedLabelCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class FlowMeasurementCluster extends BaseChipCluster {
    public FlowMeasurementCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class GeneralCommissioningCluster extends BaseChipCluster {
    public GeneralCommissioningCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void armFailSafe(
        ArmFailSafeResponseCallback callback,
        int expiryLengthSeconds,
        long breadcrumb,
        long timeoutMs) {
      armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timeoutMs);
    }

    public void commissioningComplete(CommissioningCompleteResponseCallback callback) {
      commissioningComplete(chipClusterPtr, callback);
    }

    public void setRegulatoryConfig(
        SetRegulatoryConfigResponseCallback callback,
        int location,
        String countryCode,
        long breadcrumb,
        long timeoutMs) {
      setRegulatoryConfig(chipClusterPtr, callback, location, countryCode, breadcrumb, timeoutMs);
    }

    private native void armFailSafe(
        long chipClusterPtr,
        ArmFailSafeResponseCallback callback,
        int expiryLengthSeconds,
        long breadcrumb,
        long timeoutMs);

    private native void commissioningComplete(
        long chipClusterPtr, CommissioningCompleteResponseCallback callback);

    private native void setRegulatoryConfig(
        long chipClusterPtr,
        SetRegulatoryConfigResponseCallback callback,
        int location,
        String countryCode,
        long breadcrumb,
        long timeoutMs);

    public interface ArmFailSafeResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface CommissioningCompleteResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface SetRegulatoryConfigResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }
  }

  public static class GeneralDiagnosticsCluster extends BaseChipCluster {
    public GeneralDiagnosticsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class GroupKeyManagementCluster extends BaseChipCluster {
    public GroupKeyManagementCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class GroupsCluster extends BaseChipCluster {
    public GroupsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void addGroup(AddGroupResponseCallback callback, int groupId, String groupName) {
      addGroup(chipClusterPtr, callback, groupId, groupName);
    }

    public void addGroupIfIdentifying(
        DefaultClusterCallback callback, int groupId, String groupName) {
      addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName);
    }

    public void getGroupMembership(
        GetGroupMembershipResponseCallback callback, int groupCount, int groupList) {
      getGroupMembership(chipClusterPtr, callback, groupCount, groupList);
    }

    public void removeAllGroups(DefaultClusterCallback callback) {
      removeAllGroups(chipClusterPtr, callback);
    }

    public void removeGroup(RemoveGroupResponseCallback callback, int groupId) {
      removeGroup(chipClusterPtr, callback, groupId);
    }

    public void viewGroup(ViewGroupResponseCallback callback, int groupId) {
      viewGroup(chipClusterPtr, callback, groupId);
    }

    private native void addGroup(
        long chipClusterPtr, AddGroupResponseCallback callback, int groupId, String groupName);

    private native void addGroupIfIdentifying(
        long chipClusterPtr, DefaultClusterCallback callback, int groupId, String groupName);

    private native void getGroupMembership(
        long chipClusterPtr,
        GetGroupMembershipResponseCallback callback,
        int groupCount,
        int groupList);

    private native void removeAllGroups(long chipClusterPtr, DefaultClusterCallback callback);

    private native void removeGroup(
        long chipClusterPtr, RemoveGroupResponseCallback callback, int groupId);

    private native void viewGroup(
        long chipClusterPtr, ViewGroupResponseCallback callback, int groupId);

    public interface AddGroupResponseCallback {
      void onSuccess(int groupId);

      void onError(Exception error);
    }

    public interface GetGroupMembershipResponseCallback {
      void onSuccess(int capacity, int groupCount
          // groupList: /* TYPE WARNING: array array defaults to */ uint8_t *
          // Conversion from this type to Java is not properly implemented yet
          );

      void onError(Exception error);
    }

    public interface RemoveGroupResponseCallback {
      void onSuccess(int groupId);

      void onError(Exception error);
    }

    public interface ViewGroupResponseCallback {
      void onSuccess(int groupId, String groupName);

      void onError(Exception error);
    }
  }

  public static class IdentifyCluster extends BaseChipCluster {
    public IdentifyCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void identify(DefaultClusterCallback callback, int identifyTime) {
      identify(chipClusterPtr, callback, identifyTime);
    }

    public void identifyQuery(IdentifyQueryResponseCallback callback) {
      identifyQuery(chipClusterPtr, callback);
    }

    private native void identify(
        long chipClusterPtr, DefaultClusterCallback callback, int identifyTime);

    private native void identifyQuery(long chipClusterPtr, IdentifyQueryResponseCallback callback);

    public interface IdentifyQueryResponseCallback {
      void onSuccess(int timeout);

      void onError(Exception error);
    }
  }

  public static class KeypadInputCluster extends BaseChipCluster {
    public KeypadInputCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void sendKey(SendKeyResponseCallback callback, int keyCode) {
      sendKey(chipClusterPtr, callback, keyCode);
    }

    private native void sendKey(long chipClusterPtr, SendKeyResponseCallback callback, int keyCode);

    public interface SendKeyResponseCallback {
      void onSuccess();

      void onError(Exception error);
    }
  }

  public static class LevelControlCluster extends BaseChipCluster {
    public LevelControlCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void move(
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionMask,
        int optionOverride) {
      move(chipClusterPtr, callback, moveMode, rate, optionMask, optionOverride);
    }

    public void moveToLevel(
        DefaultClusterCallback callback,
        int level,
        int transitionTime,
        int optionMask,
        int optionOverride) {
      moveToLevel(chipClusterPtr, callback, level, transitionTime, optionMask, optionOverride);
    }

    public void moveToLevelWithOnOff(
        DefaultClusterCallback callback, int level, int transitionTime) {
      moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime);
    }

    public void moveWithOnOff(DefaultClusterCallback callback, int moveMode, int rate) {
      moveWithOnOff(chipClusterPtr, callback, moveMode, rate);
    }

    public void step(
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionMask,
        int optionOverride) {
      step(
          chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionMask, optionOverride);
    }

    public void stepWithOnOff(
        DefaultClusterCallback callback, int stepMode, int stepSize, int transitionTime) {
      stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime);
    }

    public void stop(DefaultClusterCallback callback, int optionMask, int optionOverride) {
      stop(chipClusterPtr, callback, optionMask, optionOverride);
    }

    public void stopWithOnOff(DefaultClusterCallback callback) {
      stopWithOnOff(chipClusterPtr, callback);
    }

    private native void move(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int moveMode,
        int rate,
        int optionMask,
        int optionOverride);

    private native void moveToLevel(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int level,
        int transitionTime,
        int optionMask,
        int optionOverride);

    private native void moveToLevelWithOnOff(
        long chipClusterPtr, DefaultClusterCallback callback, int level, int transitionTime);

    private native void moveWithOnOff(
        long chipClusterPtr, DefaultClusterCallback callback, int moveMode, int rate);

    private native void step(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime,
        int optionMask,
        int optionOverride);

    private native void stepWithOnOff(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int stepMode,
        int stepSize,
        int transitionTime);

    private native void stop(
        long chipClusterPtr, DefaultClusterCallback callback, int optionMask, int optionOverride);

    private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class LowPowerCluster extends BaseChipCluster {
    public LowPowerCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void sleep(DefaultClusterCallback callback) {
      sleep(chipClusterPtr, callback);
    }

    private native void sleep(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class MediaInputCluster extends BaseChipCluster {
    public MediaInputCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void hideInputStatus(DefaultClusterCallback callback) {
      hideInputStatus(chipClusterPtr, callback);
    }

    public void renameInput(DefaultClusterCallback callback, int index, String name) {
      renameInput(chipClusterPtr, callback, index, name);
    }

    public void selectInput(DefaultClusterCallback callback, int index) {
      selectInput(chipClusterPtr, callback, index);
    }

    public void showInputStatus(DefaultClusterCallback callback) {
      showInputStatus(chipClusterPtr, callback);
    }

    private native void hideInputStatus(long chipClusterPtr, DefaultClusterCallback callback);

    private native void renameInput(
        long chipClusterPtr, DefaultClusterCallback callback, int index, String name);

    private native void selectInput(
        long chipClusterPtr, DefaultClusterCallback callback, int index);

    private native void showInputStatus(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class MediaPlaybackCluster extends BaseChipCluster {
    public MediaPlaybackCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void mediaFastForward(MediaFastForwardResponseCallback callback) {
      mediaFastForward(chipClusterPtr, callback);
    }

    public void mediaNext(MediaNextResponseCallback callback) {
      mediaNext(chipClusterPtr, callback);
    }

    public void mediaPause(MediaPauseResponseCallback callback) {
      mediaPause(chipClusterPtr, callback);
    }

    public void mediaPlay(MediaPlayResponseCallback callback) {
      mediaPlay(chipClusterPtr, callback);
    }

    public void mediaPrevious(MediaPreviousResponseCallback callback) {
      mediaPrevious(chipClusterPtr, callback);
    }

    public void mediaRewind(MediaRewindResponseCallback callback) {
      mediaRewind(chipClusterPtr, callback);
    }

    public void mediaSeek(MediaSeekResponseCallback callback, long position) {
      mediaSeek(chipClusterPtr, callback, position);
    }

    public void mediaSkipBackward(
        MediaSkipBackwardResponseCallback callback, long deltaPositionMilliseconds) {
      mediaSkipBackward(chipClusterPtr, callback, deltaPositionMilliseconds);
    }

    public void mediaSkipForward(
        MediaSkipForwardResponseCallback callback, long deltaPositionMilliseconds) {
      mediaSkipForward(chipClusterPtr, callback, deltaPositionMilliseconds);
    }

    public void mediaStartOver(MediaStartOverResponseCallback callback) {
      mediaStartOver(chipClusterPtr, callback);
    }

    public void mediaStop(MediaStopResponseCallback callback) {
      mediaStop(chipClusterPtr, callback);
    }

    private native void mediaFastForward(
        long chipClusterPtr, MediaFastForwardResponseCallback callback);

    private native void mediaNext(long chipClusterPtr, MediaNextResponseCallback callback);

    private native void mediaPause(long chipClusterPtr, MediaPauseResponseCallback callback);

    private native void mediaPlay(long chipClusterPtr, MediaPlayResponseCallback callback);

    private native void mediaPrevious(long chipClusterPtr, MediaPreviousResponseCallback callback);

    private native void mediaRewind(long chipClusterPtr, MediaRewindResponseCallback callback);

    private native void mediaSeek(
        long chipClusterPtr, MediaSeekResponseCallback callback, long position);

    private native void mediaSkipBackward(
        long chipClusterPtr,
        MediaSkipBackwardResponseCallback callback,
        long deltaPositionMilliseconds);

    private native void mediaSkipForward(
        long chipClusterPtr,
        MediaSkipForwardResponseCallback callback,
        long deltaPositionMilliseconds);

    private native void mediaStartOver(
        long chipClusterPtr, MediaStartOverResponseCallback callback);

    private native void mediaStop(long chipClusterPtr, MediaStopResponseCallback callback);

    public interface MediaFastForwardResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaNextResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaPauseResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaPlayResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaPreviousResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaRewindResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaSeekResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaSkipBackwardResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaSkipForwardResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaStartOverResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }

    public interface MediaStopResponseCallback {
      void onSuccess(int mediaPlaybackStatus);

      void onError(Exception error);
    }
  }

  public static class NetworkCommissioningCluster extends BaseChipCluster {
    public NetworkCommissioningCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void addThreadNetwork(
        AddThreadNetworkResponseCallback callback,
        byte[] operationalDataset,
        long breadcrumb,
        long timeoutMs) {
      addThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, timeoutMs);
    }

    public void addWiFiNetwork(
        AddWiFiNetworkResponseCallback callback,
        byte[] ssid,
        byte[] credentials,
        long breadcrumb,
        long timeoutMs) {
      addWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, timeoutMs);
    }

    public void disableNetwork(
        DisableNetworkResponseCallback callback,
        byte[] networkID,
        long breadcrumb,
        long timeoutMs) {
      disableNetwork(chipClusterPtr, callback, networkID, breadcrumb, timeoutMs);
    }

    public void enableNetwork(
        EnableNetworkResponseCallback callback, byte[] networkID, long breadcrumb, long timeoutMs) {
      enableNetwork(chipClusterPtr, callback, networkID, breadcrumb, timeoutMs);
    }

    public void getLastNetworkCommissioningResult(DefaultClusterCallback callback, long timeoutMs) {
      getLastNetworkCommissioningResult(chipClusterPtr, callback, timeoutMs);
    }

    public void removeNetwork(
        RemoveNetworkResponseCallback callback, byte[] networkID, long breadcrumb, long timeoutMs) {
      removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, timeoutMs);
    }

    public void scanNetworks(
        ScanNetworksResponseCallback callback, byte[] ssid, long breadcrumb, long timeoutMs) {
      scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, timeoutMs);
    }

    public void updateThreadNetwork(
        UpdateThreadNetworkResponseCallback callback,
        byte[] operationalDataset,
        long breadcrumb,
        long timeoutMs) {
      updateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, timeoutMs);
    }

    public void updateWiFiNetwork(
        UpdateWiFiNetworkResponseCallback callback,
        byte[] ssid,
        byte[] credentials,
        long breadcrumb,
        long timeoutMs) {
      updateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, timeoutMs);
    }

    private native void addThreadNetwork(
        long chipClusterPtr,
        AddThreadNetworkResponseCallback callback,
        byte[] operationalDataset,
        long breadcrumb,
        long timeoutMs);

    private native void addWiFiNetwork(
        long chipClusterPtr,
        AddWiFiNetworkResponseCallback callback,
        byte[] ssid,
        byte[] credentials,
        long breadcrumb,
        long timeoutMs);

    private native void disableNetwork(
        long chipClusterPtr,
        DisableNetworkResponseCallback callback,
        byte[] networkID,
        long breadcrumb,
        long timeoutMs);

    private native void enableNetwork(
        long chipClusterPtr,
        EnableNetworkResponseCallback callback,
        byte[] networkID,
        long breadcrumb,
        long timeoutMs);

    private native void getLastNetworkCommissioningResult(
        long chipClusterPtr, DefaultClusterCallback callback, long timeoutMs);

    private native void removeNetwork(
        long chipClusterPtr,
        RemoveNetworkResponseCallback callback,
        byte[] networkID,
        long breadcrumb,
        long timeoutMs);

    private native void scanNetworks(
        long chipClusterPtr,
        ScanNetworksResponseCallback callback,
        byte[] ssid,
        long breadcrumb,
        long timeoutMs);

    private native void updateThreadNetwork(
        long chipClusterPtr,
        UpdateThreadNetworkResponseCallback callback,
        byte[] operationalDataset,
        long breadcrumb,
        long timeoutMs);

    private native void updateWiFiNetwork(
        long chipClusterPtr,
        UpdateWiFiNetworkResponseCallback callback,
        byte[] ssid,
        byte[] credentials,
        long breadcrumb,
        long timeoutMs);

    public interface AddThreadNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface AddWiFiNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface DisableNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface EnableNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface RemoveNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface ScanNetworksResponseCallback {
      void onSuccess(int errorCode, String debugText
          // wifiScanResults: /* TYPE WARNING: array array defaults to */ uint8_t *
          // Conversion from this type to Java is not properly implemented yet
          // threadScanResults: /* TYPE WARNING: array array defaults to */ uint8_t *
          // Conversion from this type to Java is not properly implemented yet
          );

      void onError(Exception error);
    }

    public interface UpdateThreadNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }

    public interface UpdateWiFiNetworkResponseCallback {
      void onSuccess(int errorCode, String debugText);

      void onError(Exception error);
    }
  }

  public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster {
    public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void applyUpdateRequest(
        ApplyUpdateRequestResponseCallback callback, byte[] updateToken, long newVersion) {
      applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion);
    }

    public void notifyUpdateApplied(
        DefaultClusterCallback callback, byte[] updateToken, long currentVersion) {
      notifyUpdateApplied(chipClusterPtr, callback, updateToken, currentVersion);
    }

    public void queryImage(
        QueryImageResponseCallback callback,
        int vendorId,
        int productId,
        int imageType,
        int hardwareVersion,
        long currentVersion,
        int protocolsSupported,
        String location,
        int requestorCanConsent,
        byte[] metadataForProvider) {
      queryImage(
          chipClusterPtr,
          callback,
          vendorId,
          productId,
          imageType,
          hardwareVersion,
          currentVersion,
          protocolsSupported,
          location,
          requestorCanConsent,
          metadataForProvider);
    }

    private native void applyUpdateRequest(
        long chipClusterPtr,
        ApplyUpdateRequestResponseCallback callback,
        byte[] updateToken,
        long newVersion);

    private native void notifyUpdateApplied(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        byte[] updateToken,
        long currentVersion);

    private native void queryImage(
        long chipClusterPtr,
        QueryImageResponseCallback callback,
        int vendorId,
        int productId,
        int imageType,
        int hardwareVersion,
        long currentVersion,
        int protocolsSupported,
        String location,
        int requestorCanConsent,
        byte[] metadataForProvider);

    public interface ApplyUpdateRequestResponseCallback {
      void onSuccess(int action, long delayedActionTime);

      void onError(Exception error);
    }

    public interface QueryImageResponseCallback {
      void onSuccess(
          long delayedActionTime,
          String imageURI,
          long softwareVersion,
          byte[] updateToken,
          int userConsentNeeded,
          byte[] metadataForRequestor);

      void onError(Exception error);
    }
  }

  public static class OccupancySensingCluster extends BaseChipCluster {
    public OccupancySensingCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class OnOffCluster extends BaseChipCluster {
    public OnOffCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void off(DefaultClusterCallback callback) {
      off(chipClusterPtr, callback);
    }

    public void on(DefaultClusterCallback callback) {
      on(chipClusterPtr, callback);
    }

    public void toggle(DefaultClusterCallback callback) {
      toggle(chipClusterPtr, callback);
    }

    private native void off(long chipClusterPtr, DefaultClusterCallback callback);

    private native void on(long chipClusterPtr, DefaultClusterCallback callback);

    private native void toggle(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class OperationalCredentialsCluster extends BaseChipCluster {
    public OperationalCredentialsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void addOpCert(
        OpCertResponseCallback callback,
        byte[] nOCArray,
        byte[] iPKValue,
        long caseAdminNode,
        int adminVendorId) {
      addOpCert(chipClusterPtr, callback, nOCArray, iPKValue, caseAdminNode, adminVendorId);
    }

    public void addTrustedRootCertificate(DefaultClusterCallback callback, byte[] rootCertificate) {
      addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate);
    }

    public void opCSRRequest(OpCSRResponseCallback callback, byte[] cSRNonce) {
      opCSRRequest(chipClusterPtr, callback, cSRNonce);
    }

    public void removeAllFabrics(DefaultClusterCallback callback) {
      removeAllFabrics(chipClusterPtr, callback);
    }

    public void removeFabric(
        OpCertResponseCallback callback, long fabricId, long nodeId, int vendorId) {
      removeFabric(chipClusterPtr, callback, fabricId, nodeId, vendorId);
    }

    public void removeTrustedRootCertificate(
        DefaultClusterCallback callback, byte[] trustedRootIdentifier) {
      removeTrustedRootCertificate(chipClusterPtr, callback, trustedRootIdentifier);
    }

    public void setFabric(SetFabricResponseCallback callback, int vendorId) {
      setFabric(chipClusterPtr, callback, vendorId);
    }

    public void updateFabricLabel(OpCertResponseCallback callback, String label) {
      updateFabricLabel(chipClusterPtr, callback, label);
    }

    private native void addOpCert(
        long chipClusterPtr,
        OpCertResponseCallback callback,
        byte[] nOCArray,
        byte[] iPKValue,
        long caseAdminNode,
        int adminVendorId);

    private native void addTrustedRootCertificate(
        long chipClusterPtr, DefaultClusterCallback callback, byte[] rootCertificate);

    private native void opCSRRequest(
        long chipClusterPtr, OpCSRResponseCallback callback, byte[] cSRNonce);

    private native void removeAllFabrics(long chipClusterPtr, DefaultClusterCallback callback);

    private native void removeFabric(
        long chipClusterPtr,
        OpCertResponseCallback callback,
        long fabricId,
        long nodeId,
        int vendorId);

    private native void removeTrustedRootCertificate(
        long chipClusterPtr, DefaultClusterCallback callback, byte[] trustedRootIdentifier);

    private native void setFabric(
        long chipClusterPtr, SetFabricResponseCallback callback, int vendorId);

    private native void updateFabricLabel(
        long chipClusterPtr, OpCertResponseCallback callback, String label);

    public interface OpCSRResponseCallback {
      void onSuccess(
          byte[] CSR,
          byte[] CSRNonce,
          byte[] VendorReserved1,
          byte[] VendorReserved2,
          byte[] VendorReserved3,
          byte[] Signature);

      void onError(Exception error);
    }

    public interface OpCertResponseCallback {
      void onSuccess(int StatusCode, long FabricIndex, String DebugText);

      void onError(Exception error);
    }

    public interface SetFabricResponseCallback {
      void onSuccess(long FabricId);

      void onError(Exception error);
    }
  }

  public static class PressureMeasurementCluster extends BaseChipCluster {
    public PressureMeasurementCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class PumpConfigurationAndControlCluster extends BaseChipCluster {
    public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class RelativeHumidityMeasurementCluster extends BaseChipCluster {
    public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class ScenesCluster extends BaseChipCluster {
    public ScenesCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void addScene(
        AddSceneResponseCallback callback,
        int groupId,
        int sceneId,
        int transitionTime,
        String sceneName,
        long clusterId,
        int length,
        int value) {
      addScene(
          chipClusterPtr,
          callback,
          groupId,
          sceneId,
          transitionTime,
          sceneName,
          clusterId,
          length,
          value);
    }

    public void getSceneMembership(GetSceneMembershipResponseCallback callback, int groupId) {
      getSceneMembership(chipClusterPtr, callback, groupId);
    }

    public void recallScene(
        DefaultClusterCallback callback, int groupId, int sceneId, int transitionTime) {
      recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime);
    }

    public void removeAllScenes(RemoveAllScenesResponseCallback callback, int groupId) {
      removeAllScenes(chipClusterPtr, callback, groupId);
    }

    public void removeScene(RemoveSceneResponseCallback callback, int groupId, int sceneId) {
      removeScene(chipClusterPtr, callback, groupId, sceneId);
    }

    public void storeScene(StoreSceneResponseCallback callback, int groupId, int sceneId) {
      storeScene(chipClusterPtr, callback, groupId, sceneId);
    }

    public void viewScene(ViewSceneResponseCallback callback, int groupId, int sceneId) {
      viewScene(chipClusterPtr, callback, groupId, sceneId);
    }

    private native void addScene(
        long chipClusterPtr,
        AddSceneResponseCallback callback,
        int groupId,
        int sceneId,
        int transitionTime,
        String sceneName,
        long clusterId,
        int length,
        int value);

    private native void getSceneMembership(
        long chipClusterPtr, GetSceneMembershipResponseCallback callback, int groupId);

    private native void recallScene(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int groupId,
        int sceneId,
        int transitionTime);

    private native void removeAllScenes(
        long chipClusterPtr, RemoveAllScenesResponseCallback callback, int groupId);

    private native void removeScene(
        long chipClusterPtr, RemoveSceneResponseCallback callback, int groupId, int sceneId);

    private native void storeScene(
        long chipClusterPtr, StoreSceneResponseCallback callback, int groupId, int sceneId);

    private native void viewScene(
        long chipClusterPtr, ViewSceneResponseCallback callback, int groupId, int sceneId);

    public interface AddSceneResponseCallback {
      void onSuccess(int groupId, int sceneId);

      void onError(Exception error);
    }

    public interface GetSceneMembershipResponseCallback {
      void onSuccess(int capacity, int groupId, int sceneCount
          // sceneList: /* TYPE WARNING: array array defaults to */ uint8_t *
          // Conversion from this type to Java is not properly implemented yet
          );

      void onError(Exception error);
    }

    public interface RemoveAllScenesResponseCallback {
      void onSuccess(int groupId);

      void onError(Exception error);
    }

    public interface RemoveSceneResponseCallback {
      void onSuccess(int groupId, int sceneId);

      void onError(Exception error);
    }

    public interface StoreSceneResponseCallback {
      void onSuccess(int groupId, int sceneId);

      void onError(Exception error);
    }

    public interface ViewSceneResponseCallback {
      void onSuccess(int groupId, int sceneId, int transitionTime, String sceneName
          // extensionFieldSets: /* TYPE WARNING: array array defaults to */ uint8_t *
          // Conversion from this type to Java is not properly implemented yet
          );

      void onError(Exception error);
    }
  }

  public static class SoftwareDiagnosticsCluster extends BaseChipCluster {
    public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void resetWatermarks(DefaultClusterCallback callback) {
      resetWatermarks(chipClusterPtr, callback);
    }

    private native void resetWatermarks(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class SwitchCluster extends BaseChipCluster {
    public SwitchCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class TvChannelCluster extends BaseChipCluster {
    public TvChannelCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void changeChannel(ChangeChannelResponseCallback callback, String match) {
      changeChannel(chipClusterPtr, callback, match);
    }

    public void changeChannelByNumber(
        DefaultClusterCallback callback, int majorNumber, int minorNumber) {
      changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber);
    }

    public void skipChannel(DefaultClusterCallback callback, int count) {
      skipChannel(chipClusterPtr, callback, count);
    }

    private native void changeChannel(
        long chipClusterPtr, ChangeChannelResponseCallback callback, String match);

    private native void changeChannelByNumber(
        long chipClusterPtr, DefaultClusterCallback callback, int majorNumber, int minorNumber);

    private native void skipChannel(
        long chipClusterPtr, DefaultClusterCallback callback, int count);

    public interface ChangeChannelResponseCallback {
      void onSuccess(
          // ChannelMatch: /* TYPE WARNING: array array defaults to */ uint8_t *
          // Conversion from this type to Java is not properly implemented yet
          int ErrorType);

      void onError(Exception error);
    }
  }

  public static class TargetNavigatorCluster extends BaseChipCluster {
    public TargetNavigatorCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void navigateTarget(NavigateTargetResponseCallback callback, int target, String data) {
      navigateTarget(chipClusterPtr, callback, target, data);
    }

    private native void navigateTarget(
        long chipClusterPtr, NavigateTargetResponseCallback callback, int target, String data);

    public interface NavigateTargetResponseCallback {
      void onSuccess(String data);

      void onError(Exception error);
    }
  }

  public static class TemperatureMeasurementCluster extends BaseChipCluster {
    public TemperatureMeasurementCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class TestClusterCluster extends BaseChipCluster {
    public TestClusterCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void test(DefaultClusterCallback callback) {
      test(chipClusterPtr, callback);
    }

    public void testNotHandled(DefaultClusterCallback callback) {
      testNotHandled(chipClusterPtr, callback);
    }

    public void testSpecific(TestSpecificResponseCallback callback) {
      testSpecific(chipClusterPtr, callback);
    }

    public void testUnknownCommand(DefaultClusterCallback callback) {
      testUnknownCommand(chipClusterPtr, callback);
    }

    private native void test(long chipClusterPtr, DefaultClusterCallback callback);

    private native void testNotHandled(long chipClusterPtr, DefaultClusterCallback callback);

    private native void testSpecific(long chipClusterPtr, TestSpecificResponseCallback callback);

    private native void testUnknownCommand(long chipClusterPtr, DefaultClusterCallback callback);

    public interface TestSpecificResponseCallback {
      void onSuccess(int returnValue);

      void onError(Exception error);
    }
  }

  public static class ThermostatCluster extends BaseChipCluster {
    public ThermostatCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void clearWeeklySchedule(DefaultClusterCallback callback) {
      clearWeeklySchedule(chipClusterPtr, callback);
    }

    public void getRelayStatusLog(DefaultClusterCallback callback) {
      getRelayStatusLog(chipClusterPtr, callback);
    }

    public void getWeeklySchedule(
        DefaultClusterCallback callback, int daysToReturn, int modeToReturn) {
      getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn);
    }

    public void setWeeklySchedule(
        DefaultClusterCallback callback,
        int numberOfTransitionsForSequence,
        int dayOfWeekForSequence,
        int modeForSequence,
        int payload) {
      setWeeklySchedule(
          chipClusterPtr,
          callback,
          numberOfTransitionsForSequence,
          dayOfWeekForSequence,
          modeForSequence,
          payload);
    }

    public void setpointRaiseLower(DefaultClusterCallback callback, int mode, int amount) {
      setpointRaiseLower(chipClusterPtr, callback, mode, amount);
    }

    private native void clearWeeklySchedule(long chipClusterPtr, DefaultClusterCallback callback);

    private native void getRelayStatusLog(long chipClusterPtr, DefaultClusterCallback callback);

    private native void getWeeklySchedule(
        long chipClusterPtr, DefaultClusterCallback callback, int daysToReturn, int modeToReturn);

    private native void setWeeklySchedule(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int numberOfTransitionsForSequence,
        int dayOfWeekForSequence,
        int modeForSequence,
        int payload);

    private native void setpointRaiseLower(
        long chipClusterPtr, DefaultClusterCallback callback, int mode, int amount);
  }

  public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster {
    public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void resetCounts(DefaultClusterCallback callback) {
      resetCounts(chipClusterPtr, callback);
    }

    private native void resetCounts(long chipClusterPtr, DefaultClusterCallback callback);
  }

  public static class WakeOnLanCluster extends BaseChipCluster {
    public WakeOnLanCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster {
    public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);
  }

  public static class WindowCoveringCluster extends BaseChipCluster {
    public WindowCoveringCluster(long devicePtr, int endpointId) {
      super(devicePtr, endpointId);
    }

    @Override
    public native long initWithDevice(long devicePtr, int endpointId);

    public void downOrClose(DefaultClusterCallback callback) {
      downOrClose(chipClusterPtr, callback);
    }

    public void goToLiftPercentage(
        DefaultClusterCallback callback, int liftPercentageValue, int liftPercent100thsValue) {
      goToLiftPercentage(chipClusterPtr, callback, liftPercentageValue, liftPercent100thsValue);
    }

    public void goToLiftValue(DefaultClusterCallback callback, int liftValue) {
      goToLiftValue(chipClusterPtr, callback, liftValue);
    }

    public void goToTiltPercentage(
        DefaultClusterCallback callback, int tiltPercentageValue, int tiltPercent100thsValue) {
      goToTiltPercentage(chipClusterPtr, callback, tiltPercentageValue, tiltPercent100thsValue);
    }

    public void goToTiltValue(DefaultClusterCallback callback, int tiltValue) {
      goToTiltValue(chipClusterPtr, callback, tiltValue);
    }

    public void stopMotion(DefaultClusterCallback callback) {
      stopMotion(chipClusterPtr, callback);
    }

    public void upOrOpen(DefaultClusterCallback callback) {
      upOrOpen(chipClusterPtr, callback);
    }

    private native void downOrClose(long chipClusterPtr, DefaultClusterCallback callback);

    private native void goToLiftPercentage(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int liftPercentageValue,
        int liftPercent100thsValue);

    private native void goToLiftValue(
        long chipClusterPtr, DefaultClusterCallback callback, int liftValue);

    private native void goToTiltPercentage(
        long chipClusterPtr,
        DefaultClusterCallback callback,
        int tiltPercentageValue,
        int tiltPercent100thsValue);

    private native void goToTiltValue(
        long chipClusterPtr, DefaultClusterCallback callback, int tiltValue);

    private native void stopMotion(long chipClusterPtr, DefaultClusterCallback callback);

    private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback callback);
  }
}
